chore: add release workflow for setup-sourcebot#1279
Conversation
Adds a manually-triggered GitHub Action that publishes the setup-sourcebot CLI (packages/setupWizard) to npm via OIDC Trusted Publishing, then bumps the package version, commits it to main, tags it, and cuts a GitHub release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@brendan-kellam your pull request is missing a changelog! |
WalkthroughThis PR adds a new GitHub Actions workflow for automating the release of the setup-sourcebot CLI. The workflow accepts a manual version bump type (patch/minor/major), generates a GitHub App token, bumps the package version, builds dependent workspaces, publishes the tarball to npm using OIDC provenance, and finally commits and tags the version change on main. ChangesRelease setup-sourcebot automation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release-setup-sourcebot.yml:
- Around line 53-63: Replace unpinned action versions and remove unnecessary
submodule checkout: update uses for actions/checkout, actions/setup-node, and
actions/create-github-app-token to specific commit SHAs (pin the actions to
exact commit hashes instead of tags) and change or remove the checkout input
submodules: "true" (e.g., set submodules: false or remove the key) since
vendor/zoekt isn't used by the workspace builds; ensure the workflow still
passes the token through (token: ${{ steps.generate_token.outputs.token }})
after making these replacements.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d43101b7-5cbd-4d87-9a2f-90e721df8ff9
📒 Files selected for processing (1)
.github/workflows/release-setup-sourcebot.yml
Summary
Adds a manually-triggered GitHub Action (
.github/workflows/release-setup-sourcebot.yml) that automates releasing thesetup-sourcebotCLI (packages/setupWizard) to the public npm registry.Triggered via
workflow_dispatchwith abump_typechoice (patch/minor/major), matching the convention inrelease-prod.yml. In one job it:RELEASE_APPGitHub App token (to push to protectedmain).packages/setupWizard/package.jsonand guards against an existingsetup-sourcebot-v<version>tag.@sourcebot/schemasthensetup-sourcebot.workspace:^schemas dep to a concrete version range — somethingnpm publishcan't do on its own).npm publish --provenance, no long-lived token).[skip ci]), tagssetup-sourcebot-v<version>, pushes tomain, and cuts a GitHub release.Publish happens before the git commit/tag so a late git failure can't leave a tag for a version that never reached npm. The
setup-sourcebot-vtag prefix avoids colliding with the main product'sv<version>tags.Prerequisites (one-time, before first run)
setup-sourcebotpackage pointing atsourcebot-dev/sourcebot+ workflowrelease-setup-sourcebot.yml. (The package already exists at0.1.5, so trusted publishing can attach to it.)RELEASE_APP_ID/RELEASE_APP_PRIVATE_KEYsecrets already exist (shared withrelease-prod.yml); the App needs push access tomain.Notes
setupWizardversioning is independent of the main repo'sCHANGELOG.md-driven release; its ownpackage.jsonis the source of truth.🤖 Generated with Claude Code
Summary by CodeRabbit